<!doctype html> <!--
paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!-->
<html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths" lang="en">
	<!--<![endif]--><head>
		<meta charset="utf-8">
		<!-- Use the .htaccess and remove these lines to avoid edge case issues.
		More info: h5bp.com/b/378 -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title><?php echo $this->config->item('app_short_name');?> - <?php echo $template['title'];?></title>
      
		<meta name="description" content="">
		<meta name="author" content="Lucdt@ideavietnam.com">
		<!-- Mobile viewport optimized: j.mp/bplateviewport -->
		<meta name="viewport" content="width=device-width,initial-scale=1">
		<!-- Place favicon.ico and apple-touch-icon.png in the root directory:
		mathiasbynens.be/notes/touch-icons -->
		
		<!-- CSS -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/960gs/fluid.css"> <!-- 960.gs Grid System -->
		<!-- The HTML5-Boilerplate CSS styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/h5bp/normalize.css"> <!-- RECOMMENDED: H5BP reset styles -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/h5bp/non-semantic.helper.classes.css"> <!-- RECOMMENDED: H5BP helpers (e.g. .clear or .hidden) -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/h5bp/print.styles.css"> <!-- OPTIONAL: H5BP print styles -->
        
        <!-- The main styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/sprites.css"> <!-- STRONGLY RECOMMENDED: Basic sprites (e.g. buttons, jGrowl) -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/header.css"> <!-- REQUIRED: Header styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/navigation.css"> <!-- REQUIRED: Navigation styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/sidebar.css"> <!-- OPTIONAL: Sidebar -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/content.css"> <!-- REQUIRED: Content styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/footer.css"> <!-- REQUIRED: Footer styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/typographics.css"> <!-- REQUIRED: Typographics -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/ie.fixes.css"> <!-- OPTIONAL: Fixes for IE7 -->
		<!-- Sprites styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/sprite.forms.css"> <!-- SPRITE: Forms styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/sprite.lists.css"> <!-- SPRITE: Lists styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/icons.css"> <!-- Icons -->
        
        
		<!-- The special page's styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH."/".$userCurrentTheme."/"; ?>css/special-page.css"> <!-- REQUIRED: Special page styling -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/sprites.css"> <!-- REQUIRED: Basic sprites (e.g. buttons, jGrowl) -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/typographics.css"> <!-- REQUIRED: Typographics -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/content.css"> <!-- REQUIRED: Content (we need the boxes) -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/sprite.forms.css"> <!-- SPRITE: Forms -->
		<link rel="stylesheet" href="<?php  echo THEME_PATH.$userCurrentTheme; ?>css/ie.fixes.css"> <!-- OPTOINAL: Fixes for IE -->
		
		<!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
		<!-- All JavaScript at the bottom, except this Modernizr build incl. Respond.js
		Respond is a polyfill for min/max-width media queries. Modernizr enables HTML5
		elements & feature detects;
		for optimal performance, create your own custom Modernizr build:
		www.modernizr.com/download/ -->
		<script src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/libs/modernizr-2.0.6.min.js"></script>
	
        <!-- JavaScript at the bottom for fast page loading -->
		<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
		<script src="<?php echo SCRIPTS_PATH?>jquery.min.js"></script>
		
		<script src="<?php echo SCRIPTS_PATH?>jquery-ui.min.js"></script>
		
		<!-- scripts concatenated and minified via build script -->
		<script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/plugins.js"></script> <!-- REQUIRED: Different own jQuery plugnis -->
		<script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.validate.js"></script>
		<script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.jgrowl.js"></script>
		<script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.checkbox.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.fileinput.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.placeholder.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.miniColors.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.text-overflow.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.ui.timepicker.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.ui.touch-punch.js"></script>
        <script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/mylibs/jquery.chosen.js"></script>
        
		<script defer src="<?php  echo THEME_PATH.$userCurrentTheme; ?>js/script.js"></script> <!-- REQUIRED: Generic scripts -->
		<!-- end scripts -->
        
        <link rel="stylesheet" href="<?php  echo ROOT_URL; ?>styles/common.css">
        <link rel="stylesheet" href="<?php  echo ROOT_URL; ?>styles/overlay.css">
        <link rel="stylesheet" href="<?php  echo ROOT_URL; ?>styles/jmodel.css">
        <link rel="stylesheet" href="<?php  echo ROOT_URL; ?>styles/validationEngine.jquery.css" type="text/css"/>
        
        <link rel="stylesheet" href="<?php  echo ROOT_URL; ?>styles/flexigrid.css"/>
        
        <script language="javascript">
        //JAVA SCRIPT
			 var ROOT_URL 			= '<?php echo ROOT_URL?>';
			 var BASE_URL 			= '<?php echo site_url()?>';
			 var THEME_PATH			= '<?php echo THEME_PATH.$userCurrentTheme;?>';
			 var SCRIPTS_PATH 		= '<?php echo SCRIPTS_PATH?>';
			 var STYLES_PATH 		= '<?php echo STYLES_PATH?>';
			 var DEFAULT_CONTROLLER = '<?php echo DEFAULT_CONTROLLER?>';
		
        </script>
        <script defer src="<?php  echo ROOT_URL; ?>scripts/common/common.js"></script> 
        <script defer src="<?php  echo ROOT_URL; ?>scripts/common/overlay.js"></script> 
        <script defer src="<?php  echo ROOT_URL; ?>scripts/common/taskSchedule.js"></script> 
        
        <script defer src="<?php  echo ROOT_URL; ?>scripts/common/validate.js"></script>
        <script defer src="<?php  echo ROOT_URL; ?>scripts/flexigrid.js"></script>
        <script defer src="<?php  echo SCRIPTS_PATH; ?>common/jquery.validationEngine.js"></script>
        <script defer src="<?php  echo SCRIPTS_PATH; ?>lang/jquery.validationEngine-vi.js"></script>
        <script>
        
        function getLeaf(url) {
            return url.substring(url.lastIndexOf("/") + 1);
        }
        
        function highlightCurrentMenuItem() {
            var currentLocation = getLeaf(document.location.href);
            var menu = document.getElementById("nav_main");
            links = menu.getElementsByTagName("a");
            
            for (i = 0; i < links.length; i++) {
                console.log(links[i].getAttribute("href"));
                var currentHref = links[i].getAttribute("href");
                var currentLeafName = getLeaf(currentHref);
                if (currentLeafName == currentLocation) {
                    links[i].setAttribute("class", "current");
                    //links[i].setAttribute("className", "current");
                    var menuHeader = links[i].parentNode.parentNode.getElementsByTagName("li").item(0);
                    menuHeader.setAttribute("class", "current");
                    
                    
                   
                }else{
                    
                }
            }
        }   
        
        
        $(document).ready(function(){
              var path = location.pathname;
              console.log(path);
              var i=$("a[href$='" + path + "']");
              console.log(i);
              i.parent().addClass('current');
              i.parent().parent().css({'display':'block'});
              i.parent().parent().parent().addClass('current');                
        });
        </script>
        
        <?php echo $template['metadata']; ?>
    </head>
	<!-- Begin of #height-wrapper -->

	<div id="height-wrapper">
        <header>
				<!-- Begin of the header toolbar -->
				<div id="header_toolbar">
					<div class="container_12">
						<h1 class="grid_8"><?php echo $this->config->item('app_name');?></h1>
						<!-- Start of right part -->
						<div class="grid_4">
							<!-- A small toolbar button -->
							<div class="toolbar_small">
								<div class="toolbutton">
									<span>3</span>
									<img src="<?php  echo THEME_PATH.$userCurrentTheme; ?>img/icons/16x16/mail.png" width="16" height="16" alt="mail" >
								</div>
								<div class="toolbox">
									<span class="arrow"></span>
									<h3>Your Messages</h3>
									<ul class="mail">
										<li>
											<a href="#"> <strong>10:15</strong>Need your Help!
											<small>
												From: John
											</small> </a>
										</li>
										<li>
											<a href="#"> <strong>9:55</strong>New comment on you userTheme
											<small>
												From: userThemeforest
											</small></a>
										</li>
										<li>
											<a href="#"> <strong>Yest.</strong>Successfull backup
											<small>
												From: System
											</small></a>
										</li>
										<li class="read">
											<a href="#"> <strong>2 days</strong>Bug report
											<small>
												From: Jane
											</small></a>
										</li>
									</ul>
									<a class="inbox" href="#">Go to inbox &raquo;</a>
								</div>
							</div> <!-- End of small toolbar button -->
							
							<!-- A large toolbar button -->
							<div class="toolbar_large">
								<div class="toolbutton">
									<div class="toolicon">
										<img src="<?php  echo THEME_PATH.$userCurrentTheme; ?>img/icons/16x16/user.png" width="16" height="16" alt="user" >
									</div>
									<div class="toolmenu">
										<div class="toolcaption">
											<span><?php 
											
											echo $LoginData->firstName?> <?php echo $LoginData->lastName?></span>
										</div>
										<!-- Start of menu -->
										<div class="dropdown">
											<ul>
												<li>
													<a href="<?php echo site_url('member/setting')?>"><?php echo __("Thiết đặt");?></a>
												</li>
												<li>
													<a href="<?php echo site_url('auth/logout')?>"><?php echo __("Thoát");?></a>
												</li>
											</ul>
										</div> <!-- End of menu -->
									</div>
                                    
								</div>
							</div> <!-- End of large toolbar button -->
                            
                            <div id="languages">
				<?php 
				
				foreach ($lang_avail as $lang_code => $lang_name) : ?>
						<?php echo anchor(site_url(trim($this->uri->uri_string(), '/'), $lang_code), image('img/flag/'.$lang_code.'.png'),array('class'=>($lang_code==$lang_selected)?'current':'')); ?>
				<?php endforeach; ?>
				</div>
						</div>
						<!-- End of right part -->
					</div>
				</div>
				<!-- End of the header toolbar -->
				
				<!-- Start of the main header bar -->
				
			
            
           